package com.h52mm.zkclient;

import org.I0Itec.zkclient.ZkClient;

public class CreateNodeSample {

    public static void main(String[] args) {
        ZkClient zkClient=new ZkClient("127.0.0.1:2181");
        System.out.println("ZooKeeper session established");
        //创建持久节点
        //createParents的值设置为true，可以递归创建节点
        zkClient.createPersistent("/zkclient/test_parents",true);
        System.out.println("success create znode");
    }

}
